package com.suixinsanren.design.decoration.demo03;

public class Soy extends CondimentDecorator {

    public Soy(Beverage beverage) {
        this.beverage = beverage;
    }

    @Override
    public String getDescription() {
        return beverage.description + " , 大豆";
    }

    @Override
    public double cost() {
        switch (beverage.getSize()) {
            case TALL:
                return beverage.cost() + .10;
            case GRANDE:
                return beverage.cost() + .15;
            case VENTI:
                return beverage.cost() + .20;
            default:
                return beverage.cost();
        }
    }
}
